package dht.async;

import java.awt.Component;
import java.awt.Label;

import javax.swing.JOptionPane;
import javax.swing.JFrame; /**
 * File:   Message.java
 * Author: Gvennet
 */

/** todo write javadoc */
public final class Message
{
    private final int type;
    private final Node receiver;
    private final Node sender;
    private final Object data;

    public Message(int type, Node receiver, Node sender, Object data)
    {
        this.type = type;
        this.receiver = receiver;
        this.sender = sender;
        this.data = data;
    }

    public int getType()
    {
        return type;
    }

    public Node getReceiver()
    {
        return receiver;
    }

    public Node getSender()
    {
        return sender;
    }

    public Object getData()
    {
        return data;
    }

    public enum MessageType {
    PING_REQUEST,
        PING_RESPONSE,
        FIND_NODE_REQUEST,
        FiND_NODE_RESPONSE,

    }
}
